/**
 * @desc
 *  环境部署相关信息
 * @使用场景
 *
 * @author  杨晓东[of1081]
 * @company qianmi.com
 * @Date    15/10/22
 **/
'use strict';

var gulp =require('gulp');
let gulpCommon =require('./gulp-common');


//gulp transferFileToolsWeb && gulp restart
gulp.task('transferFileToolsWeb',function () {

	return gulp.src([
		"bin/**",
		"config/**",
		"public/build/**",
		"public/template-index/**",
		"public/manager.html",
		"public/widget-generate.html",
		"routes/**",
		"service/**",
		"util/**",
		"views/**",
		"app.js",
        ".editorconfig",
        ".eslintrc.js",
        ".eslintignore",
		"package.json",
		"mongoose/**"
	],{ base: '.' })
		.pipe(gulpCommon.getFtpInstance('172.21.4.63','root','ofcard' ,'/home/node/tpl-manager'));
});


gulp.task('restart', function () {
	return gulpCommon.restartWeb({
		hostIp: '172.21.4.63',
		userName: 'root',
		passWord: 'ofcard',
		projectRoot: '/home/tpl-manager',
	});
});

